import React from 'react';

import {useLocation} from 'react-router-dom';

/**
 * 隐式传参接收
 * @returns {Element}
 * @constructor
 */
const ChildAFour = function () {
    const location = useLocation();
    console.log(location);
    const state = location.state;
    return (
        <>
            {
                Object.keys(state).map((key) => {
                    return (
                        <>
                            {key}-{state[key]}
                        </>
                    )
                })
            }
        </>
    )

};

 export default ChildAFour;